﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WarriorRush.GameDynamics
{
    public enum EffectType
    {
        Shielded,
        Poisoned,
        Blinded,
        Enraged,
        Silenced,
        Dazed,
        Cursed,
        Haste,
        Null


    }
    
    public class GameEffect
    {
        public int Power;
        public bool IsBoost;
        public bool IsInvolvedInRush;
        public string Description;
        public string Name;
        public EffectType Type;

        public GameEffect(bool isBoost)
        {
            Type = EffectType.Null;
            IsBoost = isBoost;
            IsInvolvedInRush = false;
        }

        public virtual GameEffect GetInstance(int power)
        {
            return new GameEffect(IsBoost) {Power = power, IsInvolvedInRush = false, Description = Description, Name = Name };
            
        }

        public virtual void ModifyStats(CharacterClass character){
            
        }


        public virtual void RevertStats(CharacterClass character)
        {

        }

        public virtual int ModifyDamageDealt(int damage)
        {
            return damage;
        }

        public virtual int ModifyDamageTaken(int damage)
        {
            if (damage < 0)
                damage = 0;
            return damage;
        }

        public virtual int ModifyDefenseDamage(int damage)
        {
            return damage;
        }

        public virtual GameEffect ModifyBoostTaken(GameEffect effect)
        {
            return effect;
        }

    }
}
